package com.htudata.core.util.operation;

public class StringBufferOperationUtils {

  
  public static boolean isValidStringBuffer(StringBuffer stringBuffer) {
    if (stringBuffer == null)
      return false; 
    return StringOperationUtils.isValidStr(stringBuffer.toString());
  }
  
  public static void replaceFirstChar(StringBuffer stringBuffer, String tgtChar) {
    stringBuffer.replace(0, 1, tgtChar);
  }
  
  public static void replaceLastChar(StringBuffer stringBuffer, String tgtChar) {
    int resultLength = stringBuffer.length();
    stringBuffer.replace(resultLength - 1, resultLength, tgtChar);
  }
}
